
<!--头部-->
<div class="header">
	<div class="layui-container">
		<div class="layui-row">
			<div class="layui-col-md2">
				<div class="logo">
					<a href="/"><img src="/static/home/Picture/20181210160709_66796.png" alt="锐车"></a>
				</div>
			</div>
			<div class="layui-col-md5">
				<div class="changecitymenu">
					<a href="javascript:;" class="changecity selectcity">{if session('area')==null}全国{else/}{:session('area')}{/if} <i class="layui-icon" style="font-size:12px;">&#xe61a;</i></a>
					<div class="citylist-box layui-hide">
						<div class="citymark">
							<a href="javascript:;" dataid="cityquanguo">全</a>
							{foreach $first as $v}
							<a href="javascript:;" dataid="city{$v['first']}">{$v['first']}</a>
							{/foreach}								
						</div>
						<ul class="city-list">
							<li id="cityquanguo">
								<span class="key">全</span>
								<a href="javascript:;" class="changecity" data="quanguo">全国</a>
								{foreach $first as $v}									
								<li id="city{$v['first']}">
									<span class="key">{$v['first']}</span>
									{foreach $area as $v1}	
										{if $v1['first']==$v['first']}
										<a href="javascript:;" class="changecity" data="{$v1['id']}">{$v1['name']}</a>
										{/if}
									{/foreach}	
								{/foreach}		
								</li>
							</li>								
						</ul>
					</div>
			   </div>
			</div>
			<div class="layui-col-md4">
				<ul class="nav layui-clear">
					<li class=''><a href="{:url('home/home/index')}">首页</a></li>
					<li ><a href="{:url('home/home/buycar')}">买车</a></li>
					<li ><a href="{:url('home/home/sellcar')}">卖车</a></li>
					<li ><a href="{:url('home/Newshow/news')}">宝典</a></li>
				</ul>
			</div>
			<div class="layui-col-md1">
				{if session('qid')==null}
				<div class="toplogin">
					<i class="layui-icon">&#xe612;</i> 
					<a href="{:url('home/Home/login')}">登录</a> 
					<span class="topline">/</span> 
					<a href="{:url('home/Home/register')}">注册</a>							
				</div>
				{else/}
				<div class="toplogin">
					<a href="{:url('home/Userm/user')}">{:session('username')}</a> 
 					<span class="topline">/</span> 
					<a href="{:url('home/Home/outLogin')}">退出</a>							
				</div>
				{/if}
			</div>
		</div>
	</div>
</div>
<script type="text/javascript">
	$('.city-list').find('.changecity').click(function(){
		var data=$(this).attr('data');
		window.location.href="{:url('home/home/area')}?id="+data;
	})
</script>